/**
 * 
 */
package com.jml.springsecurity.core.social;

import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.social.security.SpringSocialConfigurer;


public class JmlSpringSocialConfigurer extends SpringSocialConfigurer {

	private String filterProcessesUrl;

	public JmlSpringSocialConfigurer(String filterProcessesUrl) {
		this.filterProcessesUrl = filterProcessesUrl;
	}
	//继承SpringSocialConfigurer重写postProcess可以自定义设置过滤的路径
	@SuppressWarnings("unchecked")
	@Override
	protected <T> T postProcess(T object) {
		SocialAuthenticationFilter filter = (SocialAuthenticationFilter) super.postProcess(object);
		//设置过滤的路径
		filter.setFilterProcessesUrl(filterProcessesUrl);
		return (T) filter;
	}

}
